//
//  DrawerTableViewCell.m
//  Project_A Gary
//
//  Created by leilei on 16/4/7.
//  Copyright © 2016年 www.lei.com. All rights reserved.
//

#import "DrawerTableViewCell.h"

@implementation DrawerTableViewCell

-(void)dealloc
{
    [_leftImgView release];
    [_nameLab release];
    [_priceLab release];
    [_typeLab release];
    [super dealloc];
    
}

#pragma mark - 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.leftImgView = [[UIImageView alloc] init];
        //self.leftImgView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.leftImgView];
        [_leftImgView release];
        
        self.nameLab = [[UILabel alloc] init];
        //self.nameLab.backgroundColor = [UIColor cyanColor];
        self.nameLab.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.nameLab];
        [_nameLab release];
        
        self.priceLab = [[UILabel alloc] init];
        //self.priceLab.backgroundColor = [UIColor yellowColor];
        self.priceLab.textColor = [UIColor redColor];
        [self.contentView addSubview:self.priceLab];
        [_priceLab release];
        
        self.typeLab = [[UILabel alloc] init];
        //self.typeLab.backgroundColor = [UIColor greenColor];
        self.typeLab.textColor = [UIColor lightGrayColor];
        [self.contentView addSubview:self.typeLab];
        [_typeLab release];
    }
    return self;
}


// 位置
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.leftImgView.frame = CGRectMake(10, 5, 80, 60);
    self.nameLab.frame = CGRectMake(100, 5, 100, 20);
    self.priceLab.frame = CGRectMake(100, 25, 100, 20);
    self.typeLab.frame = CGRectMake(100, 45, 100, 20);
    
    
}






- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
